package cn.ad.model;

import cn.ad.enumration.AdviewFormat;
import org.apache.ibatis.type.Alias;

/**
 * Created by Administrator on 2016/7/26.
 */
@Alias("adViewOrigModel")
public class AdViewOrigModel {

    /**
     * 素材ID
     */
    private String originalityId;
    /**
     * 素材名称(以素材尺寸为名称)
     */
    private String originalityName;
    /**
     * 创意的目标URL
     */
    private String clickURL;
    /**
     * 创意类型 1 图片 2 图片或文字链 3 视频 4 原生
     */
    private Integer type;
    /**
     * adView平台广告位类型 0 横幅  1 插屏  2 开屏
     */
    private String adType;
    /**
     * 素材图片尺寸
     */
    private String size;
    /**
     * 图片URL
     */
    private String url;
    /**
     * 原生素材对应的文本信息
     */
    private String text;

    private Integer elementType;

    private String indexValue;


    public String getOriginalityId() {
        return originalityId;
    }

    public void setOriginalityId(String originalityId) {
        this.originalityId = originalityId;
    }

    public String getOriginalityName() {
        return originalityName;
    }

    public void setOriginalityName(String originalityName) {
        this.originalityName = originalityName;
    }

    public String getClickURL() {
        return clickURL;
    }

    public void setClickURL(String clickURL) {
        this.clickURL = clickURL;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getAdType() {
        if (adType!=null){
            return AdviewFormat.forValue(adType);
        }else{
            return "";
        }

    }

    public void setAdType(String adType) {
        this.adType = adType;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Integer getElementType() {
        return elementType;
    }

    public void setElementType(Integer elementType) {
        this.elementType = elementType;
    }

    public String getIndexValue() {
        return indexValue;
    }

    public void setIndexValue(String indexValue) {
        this.indexValue = indexValue;
    }

    @Override
    public String toString() {
        return "AdViewOrigModel{" +
                "originalityId='" + originalityId + '\'' +
                ", originalityName='" + originalityName + '\'' +
                ", clickURL='" + clickURL + '\'' +
                ", type=" + getType() +
                ", adType='" + getAdType() + '\'' +
                ", size='" + size + '\'' +
                ", url='" + url + '\'' +
                ", text='" + text + '\'' +
                ", elementType=" + elementType +
                ", indexValue='" + indexValue + '\'' +
                '}';
    }

}
